package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Comment;
import cn.wolfcode.trip.base.domain.Reply;
import cn.wolfcode.trip.base.query.CommentQueryObject;
import cn.wolfcode.trip.base.query.ReplyQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface ICommentService {
    /**
     * 分页
     * @param qo
     * @return
     */
    PageInfo query(CommentQueryObject qo);

    /**
     * 保存一级评论
     * @param comment
     */
    void save(Comment comment);

    /**
     * 根据一级评论查询二级评论
     * @param qo
     * @return
     */
    List<Reply> listReplyAll(ReplyQueryObject qo);

    /**
     *
     * 保存二级评论
     * @param reply
     */
    void saveReply(Reply reply);

    int selectCommentCount(Long id);

    List<Map> selectOneCommentCount(Long id);
}
